package com.zsr.chapter04.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

/**
 * @Author zsr
 * @Description
 * @Date 2021/4/21 23:23
 */
public class OrderServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html;charset=utf-8");
        //定义变量并输出
        String orderId="001";String orderContent="苹果手机";

        PrintWriter out = response.getWriter();
        out.print("订单编号："+orderId+"<br/>");
        out.print("订单内容："+orderContent+"<br/>");
        out.print("查询结束<br/>");
    }
}
